Skip to content

feat: add pve8.4 packer configs #317

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

MiBUl-eu
Copy link

@MiBUl-eu MiBUl-eu commented May 8, 2025

Added Proxmox Virtual Environment Support

This template adds support for proxmox virtual environment 8.4.1 installed from iso.

This will close #273 and #250

@alexsander-souza
Copy link
Contributor

Awesome work, this is going to make a lot of people happy.

Before we continue, I must ask you to sign the CLA. Please head over to https://ubuntu.com/legal/contributors to read more about it.

@galvesribeiro
Copy link

Exactly what I was looking for! Saved my day! Thank you! :D

@MiBUl-eu
Copy link
Author

I signed the CLA.

@galvesribeiro No Problem, please let me know If you have any Problems

@galvesribeiro
Copy link

I signed the CLA.

@galvesribeiro No Problem, please let me know If you have any Problems

Going to test it here and give you feedback.

Our use case is to Use MAAS with Proxmox for the physical nodes as we do with the Ubuntu machines deploying them hands off.

We have very basic requirements:

  1. Set the Hostname as per MAAS machine name after commissioned.
  2. Set the network interfaces (essentially few OVS switches) as per MAAS configuration.
  3. Run the cloud-init YAML to set default username, pre-defined SSH keys and join the existent cluster.

Will give it a try now and let you know.

@galvesribeiro
Copy link

I was able to build the image after some tweaks I mentioned on the comments. However, after uploading it to MAAS and trying to deploy a machine with it, the deployment fail at some point and the machine won't boot. Please find attached the installation output and Curtin logs. Please rename the Curtin file from .txt to .tar.

curtin-2025-05-25.txt
installation-output-2025-05-25.log

Any idea what is going on?

Thanks!

@alexsander-souza alexsander-souza added good first issue Good for newcomers and removed CLA-missing labels May 25, 2025
@alexsander-souza
Copy link
Contributor

I was able to build the image after some tweaks I mentioned on the comments. However, after uploading it to MAAS and trying to deploy a machine with it, the deployment fail at some point and the machine won't boot. Please find attached the installation output and Curtin logs. Please rename the Curtin file from .txt to .tar.

curtin-2025-05-25.txt installation-output-2025-05-25.log

Any idea what is going on?

Thanks!

from the logs:

 http://archive.ubuntu.com/ubuntu bookworm InRelease

the machine is looking for Debian releases in the Ubuntu mirror. did you use the supplied curtin preseed file?

@galvesribeiro
Copy link

the machine is looking for Debian releases in the Ubuntu mirror. did you use the supplied curtin preseed file?

I just cloned and init/build without any parameters (besides the changes pointed on the comments). I was assuming it would use it by default. Do I need to do something else?

@alexsander-souza
Copy link
Contributor

@galvesribeiro check the README in the template, under Custom Preseed for Proxmox. you need to copy this file to you MAAS installation.

@galvesribeiro
Copy link

@galvesribeiro check the README in the template, under Custom Preseed for Proxmox. you need to copy this file to you MAAS installation.

Oops, I miss that part indeed.

It entered on GRUB the first time, but then when entering the initial option, it shutdown the machine. On MAAS, it still show "Deploying". I then powered on manually but now the boot get stuck on the secure boot failure and shutdown again:

image image

@galvesribeiro
Copy link

Sorry, ignore the Secure Boot failure. It was a mistake on the drives. Nonetheless, still failure to boot:

image

The logs doesnt error anymore, but the machine is still stuck deploying.

posta-node-01.home.sp-installation-output-2025-05-25.log

@galvesribeiro
Copy link

After that boot, all subsequent boots get the Secure Boot failure :/

I just confirmed that using the Ubuntu image on MAAS get thru just fine using the same machine without any secure boot errors.

@MiBUl-eu
Copy link
Author

After Maas copied the Image to the Server, can you try to boot from Disk directly?

I See only pxe Boots.

@galvesribeiro
Copy link

galvesribeiro commented Jun 1, 2025

@MiBUl-eu sorry for the delay, I was afk last week.

The first boot always fail and the machine shutdown right after.

If I manually change the boot back to the drive, it will boot. Although, this is undesirable when running with MAAS as it would direct to local boot if it is not needed.

The other problem I see is that it doesn't get the configuration from MAAS like networking, storage, and even the cloud-init initial run.

What should we do to have those issues fixed? It is kind of a bummer and makes the MAAS useless if it can't reliably deploy and control the images and the machine initial setup.

Thanks!

@MiBUl-eu
Copy link
Author

@galvesribeiro same delay from me.

I have disk boot configured as seconde or sometimes as first boot order and only switch to pxe if i redeploy with maas, for me that was suitable because i dont want to reinstall my Hypervisor that often.

Also for me the cloud init part is completly working. I had to make some fixes for our environment, i will look if i need to add them to this pr.

@virtual-hexagon
Copy link

@MiBUl-eu Thank you for this contribution! As a newcomer to MAAS but long time proxmox user, this was exactly the functionality I was looking for. So I am glad to see others interested in it too.

I did some testing in my own environment and was able to replicate @galvesribeiro's results

  1. I was able to build the packer image after adjusting some of the wait times for boot and when the commands were sent in the QEMU builder
  2. I tweaked my build further but was ultimately able to deploy an EFI bootable image to 4 nodes.
    • Target machine has EFI partition only.
    • 16 GB OS partition is a ZFS Raid 0 that will be modified at later provisioning.
  3. I was able to boot via the OS drive using the EFI partition with Secure Boot off. MAAS did not change the boot order of my nodes so the drive is still first and PXE second.

Observations:

  1. My networking setup didn't seem to work. I have to manually fix the /etc/networking to make the node reachable. I noticed that even though we are using Proxmox 8.4, my network interface were using the older style interface names not the systemd predictable network interface names I expected. Since Proxmox made the change in 8.2 this was a surprise. I'm not sure why that is happening yet but I'm going through the network stuff again.
  2. I didn't see much evidence of cloud-init working in my setup, but given my networking problems I am not surprised and will take a second crack at it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

plz add proxmox img
4 participants